<?php 
$GLOBALS['Md'] = "RHEID348";
$GLOBALS['Pd'] = "B";
require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
MYTCONN();
	// Show Title
	form_pr('vwinventory','','','post'); ?>
    <div class="title">Inventário</div>
    <div style="padding:8px">Escolha um inventário para visualizar: <?php 
	$qrInventories = "SELECT ivtID AS ID, ivtName AS NAME FROM systemoffice.inventories";
	mn_field('select','ED','ivtID','',$qrInventories,'','',''); 
	echo ' Departamento: ';
	$qrDept = "SELECT ref AS ID, name AS NAME FROM systemoffice.main_offices WHERE type IN (1,2,5)";
	mn_field('select','ED','ivtDepartment','',$qrDept,' ','',''); 
	mn_field('button','ED','ivtSubmit','Consultar','','','','" onclick="
		document.vwinventory.action=\'Modules/RHEID348/lib/rs_vwinventory.php\';
		subform(\'vwinventory\',\'BoardPanel\');'); 
	echo ' | ';
	mn_field('button','ED','ivtPrint','Imprimir','','','','" onclick="
		newprint(\''.$GLOBALS['APP'].'Export_Print.mex?MOD=RHEID348&OB=\'+document.vwinventory.ivtDepartment.value+\'&ID=02\',\'Printer\');'); 
	?></div>
	</form>
    <div id="BoardPanel"><?php include($GLOBALS['PAD'].'Modules/RHEID348/lib/rs_vwinventory.php'); ?></div>